function createApp(rootComponent) {
  return {

    mounted(str){
      const root =  document.querySelector(str);
      let isMounted = false;
      let oldValue = null;
      watchEffect(()=>{
        if(isMounted){
          const newValue = rootComponent.render();
          patch(oldValue,newValue)
          oldValue = newValue
        }else{
          oldValue = rootComponent.render();
          mount(oldValue,root);
          isMounted = true
        }

      })


    }
  }
}